package com.its.service;

import java.util.HashMap;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;

import com.its.dao.UserDao;
import com.its.model.User;

@Service
public class UserService extends ModelService<User, UserDao> {
	public User login(String userName,String password) {
		HashMap<String, String> userModel= new HashMap<>();
		userModel.put("userName", userName);
		userModel.put("password",password);
		return dao.login(userModel);
	}
	
	public int register(User user) throws DataAccessException {
		return dao.register(user);
	}
}
